package main.grammar;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class Tokens {
	private Map<String, Token> referencedTokens = new HashMap<String, Token>();

	public void addReference(Token token) {
		referencedTokens.put(token.getName(), token);
	}

	public Token getReference(String reference) {
		return referencedTokens.get(reference);
	}

	public Collection<Token> getTokens() {
		return this.referencedTokens.values();
	}

}
